"""
 -*- coding: utf-8-*-
 @File: page_home.py
 @Author: chen
 @time: 2023/12/03/ 10:31
"""
from stage_L1.lim_project.page_po.businesses.page_base import BasePage
from stage_L1.lim_project.page_po.businesses.page_login import LoginPage
from stage_L1.lim_project.page_po.utils.mgt_logger import logger


class HomePage(BasePage):
    """首页页面"""

    def goto_project(self):
        """进入项目管理页面"""
        _btn_project = (self.BY.XPATH, r'//*[@title="项目管理"]')
        logger.info("点击项目管理按钮")
        self.do_click(_btn_project)
        from stage_L1.lim_project.page_po.businesses.page_project.page_project_mgt import ProjectMgtPage
        logger.info("成功进入项目管理页面")
        return ProjectMgtPage(self.driver)


if __name__ == '__main__':
    cur_page = LoginPage().login()
    cur_page.goto_project()
    cur_page.do_quit()
